#ifndef CSYSTEM_H
#define CSYSTEM_H

#include "vector"
#include "PARStemCell.h"
#include "main.h"
#include "CStemCell.h"

#define INITCELL 20000 // 初始化开辟的空间,两万
#define NROW 24 // d_sys_cells的列数


class CSystem{
private:
    int sys_NumCell;		// Number of total cells in the animal (in unit 10^6).
    int sys_NumCellResting;     // Number of cells in the resting phase
    int sys_NumCellProlif;      // Number of cells in the proliferation phase
    double sys_u;          // Microenvironemnt value
    
    double* d_sys_cells, *h_sys_cells; //保存细胞数据
    double* d_sys_par;
    PARStemCell sys_par; //初始化参数
    double * d_N0,* d_N1;
	void OutPutSys(double step);
    void outPutGeneRecord(double t);
public:
	~CSystem();
	CSystem(int N0);
    double sys_varsigma;//环境变量
    double sys_mutationrate;
    void readMutationrate(std::string fpar);
	void Run();
    
    bool SystemUpdate(double t);
};

#endif
